<?php

namespace app\admin\model;

use app\common\model\TimeModel;

class Projects extends TimeModel
{

    protected function getOptions(): array
    {
        return [
            'name'       => "projects",
            'table'      => "",
            'deleteTime' => "delete_time",
        ];
    }

    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id');
    }

    public function cate()
    {
        return $this->hasOne(ProjectCate::class, 'id', 'cate_id');
    }

    public function village()
    {
        return $this->hasOne(SystemVillage::class, 'id', 'village_id');
    }

}